﻿<UserControl x:Class="Candy.Home"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="clr-namespace:Candy"
    MinWidth="400" 
    MinHeight="300"           
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" 
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    d:DesignHeight="577"
    d:DesignWidth="995"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:gala="http://www.galasoft.ch/mvvmlight"
    DataContext="{Binding Source={StaticResource Locator}, Path=Home}">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <gala:EventToCommand Command="{Binding InitNavigation}"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <Grid x:Name="LayoutRoot"  Background="{StaticResource WindowBackground}"  ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition/>
            <RowDefinition Height="Auto" MinHeight="22"/>
        </Grid.RowDefinitions>

        <Image Source="Images/Candy28.png" Stretch="None" HorizontalAlignment="Left" Margin="8,4,0,0" Width="19" VerticalAlignment="Center" />
        <TextBlock  HorizontalAlignment="Left" Margin="38,0,0,13" x:Name="title" Text="{Binding ProjectName, StringFormat=Candy - \{0\}, TargetNullValue=Candy}" VerticalAlignment="Top" Foreground="{StaticResource Foreground}" FontSize="{StaticResource ApplicationNameFontSize}" Opacity="0.6" />
        <StackPanel Grid.Row="1" Orientation="Horizontal" x:Name="stackPanel1" Margin="0">
            <HyperlinkButton   Margin="8,0,10,0" Content="HOME" Foreground="{StaticResource Foreground}" Command="{Binding NavHome, Mode=OneWay}" FontSize="14"/>
            <HyperlinkButton   Margin="0,0,10,0" Content="BLAST" Foreground="{StaticResource Foreground}" Command="{Binding NavBlast, Mode=OneWay}" FontSize="14"/>
            <HyperlinkButton   Margin="0,0,10,0" Command="{Binding NavSearch}" Content="SEARCH" Foreground="{StaticResource Foreground}" FontSize="14"/>
            <HyperlinkButton   Margin="0,0,10,0" Command="{Binding NavigateSettings}" Content="SETTINGS" Foreground="{StaticResource Foreground}" FontSize="14"/>
            <HyperlinkButton Margin="0,0,10,0" Command="{Binding NavTheme}" Content="THEME" Foreground="{StaticResource Foreground}" FontSize="14"/>
        </StackPanel>


        <sdk:Frame x:Name="frame1" Grid.Row="4" Navigated="frame1_Navigated" />
        <!--<c:GotUpdated x:Name="GotUpdatedCtrl" Grid.RowSpan="3" Visibility="Collapsed" d:IsHidden="True"/>-->
        
        <Border Grid.Row="2" VerticalAlignment="Center" Background="{StaticResource ControlBackground}" >
        <c:ProgressReporterCtrl x:Name="progReporter" Height="6" />
        </Border>
        <c:ErrorInfoControl x:Name="ErrorInforCtrl" Height="Auto" Margin="0" Grid.Row="3" VerticalAlignment="Center" Visibility="Collapsed"/>
        <Rectangle Fill="{StaticResource Accent}" Margin="0" Grid.Row="5" StrokeThickness="0"/>
        <TextBlock  HorizontalAlignment="Left" Margin="38,0,0,0" x:Name="version" VerticalAlignment="Bottom" Foreground="{StaticResource Foreground}" Opacity="0.6" Text="1.0.0" FontSize="11" />

    </Grid>

</UserControl>
